﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using General.IServices;
using General.Utility;

namespace General.Controllers
{
    public class HomeController : BaseController
    {
        //注此处禁止直接new PersonServices()应该通过构造函数注入方式
        IPersonServices _dal;
        /// <summary>
        /// 构造函数注入
        /// </summary>
        /// <param name="dal"></param>
        public HomeController(IPersonServices dal)
        {
            this._dal = dal;
            ConfigInit.InitConfig();
            var a = SysConfig.A2;
        }
        public ActionResult Index()
        {
            this._dal.GetAll();
            return View();
        }
    }
}